package com.heima.article.job;

import com.heima.article.service.ApArticleService;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author 陈辉
 * @data 2024 14:09
 */
@Component
@Slf4j
public class HotArticleComputeJob {

    @Autowired
    private ApArticleService apArticleService;

    @XxlJob("computeHotArticleJob")
    public void computeHotArticleJob(){
      log.info("**********************计算热点文章begin************");
        apArticleService.computeHotArticle();
      log.info("**********************计算热点文章end************");
    }
}
